#pragma once
#include <iostream>
#include <unistd.h>
#include <cstring>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
enum ExitCode
{
    OK = 0,
    USERAGE_ERR,//运行服务器
    USAGE_ERR,//运行客户端
    SOCKET_ERR,//创建套接字
    BIND_ERR,//绑定端口号,和ip
    LISTEN_ERR,//服务器监听
    CONNECT_ERR,//客户端请求建立连接
    FORK_ERR,//
    ACCEPT_ERR,//
    OPEN_ERR//
};

#define COVN(addr) ((struct sockaddr*)&addr)